package com.andyage.admin.service.impl;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Service;

import com.andyage.admin.service.IAdHttpService;
import com.andyage.util.HttpUtil;
import com.andyage.util.MyConfig;

import net.sf.json.JSONObject;
@Service
public class AdHttpServiceImpl implements IAdHttpService {

	@Override
	public void postHttpByProjectId(HttpServletRequest request, HttpServletResponse response) {
		String projectId = request.getParameter("projectId");
		//String result = HttpUtil.sendPost(MyConfig.NORMAL, "projectId="+projectId);
		String result = HttpUtil.sendGet(MyConfig.NORMAL, "projectId="+projectId);
		System.out.println(result);
		try {
			response.getWriter().print(result);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
